package com.domain.oa.controller;

import com.domain.oa.utils.RedisUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/message")
public class MessageController {

    @Resource
    private RedisUtils redisUtils;


    @GetMapping("/{userId}")
    public Object getMessage(@PathVariable Integer userId) {
        return redisUtils.get("userInfo:"+userId);
    }
}
